package com.sgb.goods.view.adapter;

import androidx.databinding.ViewDataBinding;

import com.chad.library.adapter.base.BaseViewHolder;
import com.sgb.goods.BR;
import com.sgb.goods.R;
import com.sgb.goods.entity.SkuDetail;
import com.sgb.goods.utils.base.adapter.BaseCommonAdapter;

public class MemberPriceAdapter extends BaseCommonAdapter<SkuDetail.SkuListEntity> {

    public MemberPriceAdapter() {
        super(R.layout.goods_item_member_price, BR.viewModel);
    }

    @Override
    protected void convert(BaseViewHolder baseHolder, ViewDataBinding dataBinding, SkuDetail.SkuListEntity entity) {
//        line = baseHolder.getView(R.id.line);
//        if (baseHolder.getLayoutPosition() == getData().size() - 1) {
//            line.setVisibility(View.INVISIBLE);
//        }
        baseHolder.setVisible(R.id.line, baseHolder.getLayoutPosition() != getData().size() - 1);
    }
}
